package indi.zhifa.study2024.nbr.busycore.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import indi.zhifa.core.common.web.entity.ann.ZhiFaRestController;
import indi.zhifa.study2024.nbr.busycore.gen.busy.define.po.GenItemEntity;
import indi.zhifa.study2024.nbr.busycore.logic.report.define.IItemService;
import indi.zhifa.study2024.nbr.busycore.logic.report.define.entity.ItemPageRequest;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

@Slf4j
@Validated
@RequiredArgsConstructor
@RequestMapping(value = "/api/nbr/busy-core/item")
@ZhiFaRestController
@Tag(name = "商品定义")
public class ItemController {

    private final IItemService mItemService;

    @Operation(summary = "产看商品分页")
    @PostMapping("/page")
    public Page<GenItemEntity> page(@RequestBody ItemPageRequest pItemPageRequest){
        return mItemService.page(pItemPageRequest);
    }


}
